<?xml version="1.0"?>

<project name="iText.book" default="src.tar.gz">
	<property name="src.types" value="**/*.java, **/*.jsp" />
	
	<path id="book.classpath">
	    <pathelement path="lib/iText.jar"/>
	    <pathelement path="lib/iText-xtra.jar"/>
	    <pathelement path="lib/iText-pdfa.jar"/>
	    <pathelement path="lib/iText-xml.jar"/>
		<pathelement path="lib/itext-asian.jar"/>
	    <pathelement path="lib/itext-hyph-xml.jar"/>
	    <pathelement path="lib/xerces_2_5_0.jar"/>
        <pathelement path="lib/bcprov-jdk15on-1.48.jar" />
        <pathelement path="lib/bcpkix-jdk15on-1.48.jar" />
	    <pathelement path="lib/hsqldb.jar"/>
	    <pathelement path="lib/servlet.jar"/>
        <pathelement location="lib/jfreechart.jar" />
        <pathelement location="lib/jcommon.jar" />
        <pathelement location="lib/batik-awt-util.jar" />
        <pathelement location="lib/batik-bridge.jar" />
        <pathelement location="lib/batik-css.jar" />
        <pathelement location="lib/batik-dom.jar" />
        <pathelement location="lib/batik-ext.jar" />
        <pathelement location="lib/batik-gvt.jar" />
        <pathelement location="lib/batik-parser.jar" />
        <pathelement location="lib/batik-script.jar" />
        <pathelement location="lib/batik-svg-dom.jar" />
        <pathelement location="lib/batik-util.jar" />
        <pathelement location="lib/batik-xml.jar" />
	</path>
	
	<target name="src.tar.gz" description="--> makes a tar.gz-file with the source code">
		<tar compression="gzip" tarfile="source.tar.gz">
			<tarfileset prefix="src" dir="src" includes="${src.types}" />
		</tar>
	</target>
	
	<target name="results.tar.gz" description="--> makes a tar.gz-file with the results">
		<tar compression="gzip" tarfile="results.tar.gz">
			<tarfileset prefix="results" dir="results" />
		</tar>
	</target>

	<target name="compile" description="--> compiles all the examples">
		<mkdir dir="bin" />
		<javac source="1.5" target="1.5" srcdir="src" destdir="bin">
		    <classpath refid="book.classpath"/>
		</javac>
	</target>
	
	<target name="execute">
	    <ant antfile="examples.xml" target="execute" />
	</target>
	
	<target name="clean">
	    <ant antfile="examples.xml" target="clean" />
	</target>
</project>